import 'osc_notice.dart';

class OscProjectCatalogListEntity {
	List<OscSoftwareType> softwareTypes;
	OscNotice notice;

	OscProjectCatalogListEntity({this.softwareTypes, this.notice});

	OscProjectCatalogListEntity.fromJson(Map<String, dynamic> json) {
		if (json['softwareTypes'] != null) {
			softwareTypes = new List<OscSoftwareType>();(json['softwareTypes'] as List).forEach((v) { softwareTypes.add(new OscSoftwareType.fromJson(v)); });
		}
		notice = json['notice'] != null ? new OscNotice.fromJson(json['notice']) : null;
	}

	Map<String, dynamic> toJson() {
		final Map<String, dynamic> data = new Map<String, dynamic>();
		if (this.softwareTypes != null) {
      data['softwareTypes'] =  this.softwareTypes.map((v) => v.toJson()).toList();
    }
		if (this.notice != null) {
      data['notice'] = this.notice.toJson();
    }
		return data;
	}
}

class OscSoftwareType {
	String name;//tag的name
	int tag;//tag的ID

	OscSoftwareType({this.name, this.tag});

	OscSoftwareType.fromJson(Map<String, dynamic> json) {
		name = json['name'];
		tag = json['tag'];
	}

	Map<String, dynamic> toJson() {
		final Map<String, dynamic> data = new Map<String, dynamic>();
		data['name'] = this.name;
		data['tag'] = this.tag;
		return data;
	}
}
